import { createSlice } from '@reduxjs/toolkit'

export const tabSlice = createSlice({
  name: 'tab',
  initialState: {
    isCollapsed: false
  },
  reducers: {
        setCollapesed(state){
            state.isCollapsed = !state.isCollapsed
        }
  }
})
// 每个 case reducer 函数会生成对应的 Action creators
export const { setCollapesed } = tabSlice.actions

export default tabSlice.reducer